package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 
 *
 * @author wangtao
 * @since 2022-11-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_student_enroll_family")
@Schema(name = "EduStudentEnrollFamily", title = "", description = "实体类")
public class EduStudentEnrollFamily extends Model<EduStudentEnrollFamily> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "studentPreFamilyId", title = "预采集家庭关系id")
    @TableId(value = "student_pre_family_id", type = IdType.ASSIGN_ID)
    private Long studentPreFamilyId;

    @Schema(name = "studentEnrollPreId", title = "预采集id")
    @TableField(value = "student_enroll_pre_id")
    private String studentEnrollPreId;

    @Schema(name = "personId", title = "人员id")
    @TableField(value = "person_id")
    private Long personId;

    @Schema(name = "idcard", title = "身份证")
    @TableField(value = "idcard")
    private String idcard;

    @Schema(name = "fullName", title = "姓名")
    @TableField(value = "full_name")
    private String fullName;

    @Schema(name = "cardType", title = "证件类型")
    @TableField(value = "card_type")
    private String cardType;

    @Schema(name = "relationshipType", title = "与学生的关系类型：1父亲 2母亲 3爷爷 4奶奶 5外公 6外婆 7监护人")
    @TableField(value = "relationship_Type", updateStrategy = FieldStrategy.NOT_NULL)
    private String relationshipType;

    @Schema(name = "address", title = "现居住地址")
    @TableField(value = "address")
    private String address;

    @Schema(name = "householdPlace", title = "户籍地")
    @TableField(value = "household_place")
    private String householdPlace;

    @Schema(name = "work", title = "工作单位")
    @TableField(value = "work")
    private String work;

    @Schema(name = "cellphone", title = "联系手机")
    @TableField(value = "cellphone")
    private String cellphone;

    @Schema(name = "familyFlag", title = "出生证比对状态")
    @TableField(value = "family_flag", updateStrategy = FieldStrategy.NOT_NULL)
    private String familyFlag;

    @Schema(name = "familyRemark", title = "出生证比对备注")
    @TableField(value = "family_remark")
    private String familyRemark;

    @Schema(name = "houseFlag", title = "房产是否可用于入学 0 否 1 是")
    @TableField(value = "house_flag", updateStrategy = FieldStrategy.NOT_NULL)
    private String houseFlag;
    @Schema(name = "createName", title = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", title = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", title = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", title = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "del", title = "逻辑删除标志")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.studentPreFamilyId;
    }
}
